{include file="header.html"}
<div class="title tc ml-30 mr-10">
	<h2>客户售后走访信息录入</h2>
</div>
<div class="content px-20">
<form name="myForm" id="myForm" action="/index.php?act=interview&st=aftermarketSave" method="post">
	<section id="step1">
		<table class="my-10">
		    <tbody>
		        <tr>
		            <td class="pl-10 tr">客户名称:</td><td class="pl-15"><input id="customer_name" name="customer_name" type="text" /><br/><font color='red' id='td_customer_name'></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr">住所省份:</td><td class="pl-15"><input id="province" name="province" type="text" /><br/><font color='red' id="td_province"></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr">住所地市:</td><td class="pl-15"><input id="city" name="city" type="text" /><br/><font color='red' id="td_city"></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr">住所区县:</td><td class="pl-15"><input id="area" name="area" type="text"/><br/><font color='red' id="td_area"></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr">住所街道:</td><td class="pl-15"><input id="street" name="street" type="text" /><br/><font color='red' id="td_street"></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr vt">企业概况:</td>
		            <td class="pl-15">
		            	<textarea id="general" name="general" rows="3"></textarea>
					</td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr vt">用户拿货能力:</td>
		            <td class="pl-15">
		            	<textarea id="ability" name="ability" rows="3"></textarea>
					</td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr">收集月用户状态:</td><td class="pl-15"><input id="status" name="status" type="text" /><br/><font color='red' id="td_status"></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr">业务所属部门:</td><td class="pl-15"><input id="part" name="part" type="text" /></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tr">维护业务人员:</td><td class="pl-15"><input id="sale_name" name="sale_name" type="text" /></td>
		        </tr>
		    </tbody>
		</table>
		<p class="tc mt-30"><span id="btn_next_step1" class="btn w-150" style="display:inline-block">下一步，填写收集人信息 </span></p>
	</section>
	<section id="step2" style="display:none">
		<table style="margin-top:10px;margin-bottom:20px">
		    <tbody>
		    	<tr>
		            <td class="pl-10 tr">问题收集日期:</td><td class="pl-15"><input id="collection_date" name="collection_date" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题收集渠道:</td><td class="pl-15"><input id="collection_channel" name="collection_channel" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题收集人姓名:</td><td class="pl-15"><input id="collection_name" name="collection_name" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题收集人部门:</td><td class="pl-15"><input id="collection_part" name="collection_part" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题收集人电话:</td><td class="pl-15"><input id="collection_tel" name="collection_tel" type="tel" /></td>
		        </tr>
		    </tbody>
		</table>
		<p class="tc mt-30"><span id="btn_next_step2" class="btn w-150" style="display:inline-block">下一步，填写问题描述 </span>	</p>
	</section>
	<section id="step3" style="display:none;margin-bottom:10px">
	   <div class="question" id="q_1">
		   <h3>问题1</h3>
		   <table style="margin-top:10px;margin-bottom:20px">
			    <tbody>
			        <tr>
			            <td class="pl-20">问题简称:</td><td class="pl-15"><input name="question[]" type="text" /></td>
			        </tr>
			        <tr>
			            <td class="pl-20 vt">问题描述:</td>
			            <td class="pl-15">
			            	<textarea name="question_desc[]" rows="3" placeholder="输入简述，限300字以内"></textarea>
						</td>
			        </tr>
			    </tbody>
			</table>			
	   </div>
	   <p class="add_question" id="add_question" q_count="1"><strong>十 添加问题</strong></p>
		<p class="tc mt-30"><span id="btn_next_step3" class="btn w-150" style="display:inline-block"> 下一步，填写提出人信息  </span></p>
	</section>
	<section id="step4" style="display:none;margin-bottom:10px">
	   <table style="margin-top:10px;margin-bottom:20px">
		    <tbody>
		    	<tr>
		            <td class="pl-10 tr">问题所涉合同:</td><td class="pl-15"><input id="agreement" name="agreement" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题所涉及产品:</td><td class="pl-15"><input id="product" name="product" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题所涉牌号:</td><td class="pl-15"><input id="grade" name="grade" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题所涉规格:</td><td class="pl-15"><input id="format" name="format" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题所涉数量:</td><td class="pl-15"><input id="number" name="number" type="tel" class="w-150" /> 吨</td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题所涉批号:</td><td class="pl-15"><input id="betch" name="betch" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题发生日预判:</td><td class="pl-15"><input id="occur_date" name="occur_date" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题提出人姓名:</td><td class="pl-15"><input id="person_name" name="person_name" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题提出人职务:</td><td class="pl-15"><input id="person_study" name="person_study" type="text" /></td>
		        </tr>
		    	<tr>
		            <td class="pl-10 tr">问题提出人电话:</td><td class="pl-15"><input id="person_tel" name="person_tel" type="tel" /></td>
		        </tr>
		    </tbody>
		</table>
		<p class="tc"><span id="btn_submit" class="btn w-150" style="display:inline-block"> 完成提交  </span></p>
	</section>
</form>
<script type="text/javascript">
function showStep() {
	var hash = (!window.location.hash)? "#step1":window.location.hash;
	switch(hash) {
	  case "#step1":
		  $("#step1").show();
		  $("#step2").hide();
		  $("#step3").hide();
		  $("#step4").hide();
		  break;
	  case "#step2":
		  $("#step1").hide();
		  $("#step2").show();
		  $("#step3").hide();
		  $("#step4").hide();
		  break;
	  case "#step3":
		  $("#step1").hide();
		  $("#step2").hide();
		  $("#step3").show();
		  $("#step4").hide();
		  break;
	  case "#step4":
		  $("#step1").hide();
		  $("#step2").hide();
		  $("#step3").hide();
		  $("#step4").show();
		  break;
	}
}
$(function(){
	showStep();
	$(window).bind('hashchange', function() {  //监听浏览器前进，后退处理
		showStep();
	});
	$("#btn_next_step1").on("tap",function(){
		var customer_name = $.trim($("#customer_name").val());
		if(customer_name == '') {
			$('#td_customer_name').html('请填写客户名称！');
			return false;
		}
		window.location.hash = "#step2";
		$("#step1").hide();
		$("#step2").show();
		$("#step3").hide();
		$("#step4").hide();
	});
	$("#btn_next_step2").on("tap",function(){
		window.location.hash = "#step3";
		$("#step1").hide();
		$("#step2").hide();
		$("#step3").show();
		$("#step4").hide();
	});
	$("#btn_next_step3").on("tap",function(){
		window.location.hash = "#step4";
		$("#step1").hide();
		$("#step2").hide();
		$("#step3").hide();
		$("#step4").show();
	});
	$("#add_question").on("tap",function(){
		var q_count = $(this).attr("q_count");
		if(q_count<3) {
			var q_num = parseInt(q_count)+1;
			var html = "<div class='question' id='q_" + q_num + "'><h3>问题" + q_num + "</h3><table style='margin-top:10px;margin-bottom:20px'><tbody><tr><td class='pl-20'>问题简称:</td><td class='pl-15'><input name='question[]' type='text' /></td></tr><tr><td class='pl-20 vt'>问题描述:</td><td class='pl-15'><textarea name='question_desc[]' placeholder='输入简述，限300字以内' rows='3'></textarea></td></tr></tbody></table></div>";
			$("#q_"+q_count).append(html);
			$(this).attr("q_count",q_num);
			if(q_num == 3) {
				$(this).hide();
			}
		}
	});
	$("#btn_submit").on("tap",function(){
		$("#myForm").submit();
	});
	$("input,textarea").change(function(){
		var obj = $(this).attr("id");
		var objVal = $.trim($("#"+obj).val());
		if(objVal != '') {
			$("#td_"+obj).hide();
		}
	});
});

</script>
</div>
{include file="footer.html"}